import request from '../utils/request';

export async function addStoreEnroll(data) {
  return request({
    url: '/storeEnroll/add',
    method: 'POST',
    data
  })
}

export async function deleteStoreEnroll(id) {
  return request({
    url: '/storeEnroll/delete/'+id,
    method: 'DELETE',
	// header: 'application/json',
  })
}

export async function getStoreEnroll(id) {
  return request({
    url: '/storeEnroll/list/'+id,
    method: 'GET',
	header: 'application/json',
  })
}

export async function getStoreEnrollByUserId(id) {
  return request({
    url: '/storeEnroll/listByUserId/'+id,
    method: 'GET',
    data: {userId: id},
    header: 'application/json',
  })
}

export async function updateStoreEnroll(id, data) {
  return request({
    url: '/storeEnroll/update/'+id,
    method: 'PUT',
	// header: 'application/json',
	data,
  })
}


export async function getStore(pageNum, pageSize) {
  return request({
    url: `/store/list?pageNum=${pageNum}&pageSize=${pageSize}`,
    method: 'GET',
  })
}
